package com.bzkj.basicinfo.mapper.allocation;

import com.bzkj.basicinfo.domain.allocation.WmsStockAllocationDetailEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * WMS库存分配明细 Mapper接口
 *
 * @author system
 * @date 2025-10-22
 */
public interface WmsStockAllocationDetailMapper {

    /**
     * 查询分配明细列表
     */
    List<WmsStockAllocationDetailEntity> selectAllocationDetailList(WmsStockAllocationDetailEntity entity);

    /**
     * 根据分配ID查询明细
     */
    List<WmsStockAllocationDetailEntity> selectDetailsByAllocationId(@Param("allocationId") Long allocationId);

    /**
     * 新增分配明细
     */
    int insertAllocationDetail(WmsStockAllocationDetailEntity entity);

    /**
     * 批量新增分配明细
     */
    int batchInsertAllocationDetail(@Param("list") List<WmsStockAllocationDetailEntity> list);

    /**
     * 更新分配明细
     */
    int updateAllocationDetail(WmsStockAllocationDetailEntity entity);

    /**
     * 删除分配明细
     */
    int deleteAllocationDetailById(@Param("id") Long id);

    /**
     * 根据分配ID删除明细
     */
    int deleteDetailsByAllocationId(@Param("allocationId") Long allocationId);
}
